#pragma once

#include <linux/types.h>
#include <linux/clocksource.h>

struct clock_event_device;

struct clock_event_device
{
    void (*event_handler)(struct clock_event_device *);

    unsigned long min_delta_ticks;
    unsigned long max_delta_ticks;
};

void clockevents_config_and_register(struct clock_event_device *dev,
                                     unsigned int freq, unsigned long min_delta,
                                     unsigned long max_delta);

void clockevents_register_device(struct clock_event_device *dev);

void clockevents_handle(struct clock_event_device *dev);
